package com.li.taskcenter.service.quartz;

import com.li.configserve.domain.common.CurrentUser;
import com.li.configserve.domain.gloabreturn.ResponseInfo;
import org.quartz.Scheduler;

import java.util.Map;

/**
 * @Author LiDong
 * @Date 20:42 2020/12/22
 **/
public interface QuartzService {

    /**
     * @Author LiDong
     * @Description //创建一个任务
     * @Date 20:45 2020/12/22
     * @Param [quartzBean, paramMap, currentUser]
     * @return com.li.configserve.domain.gloabreturn.ResponseInfo
     **/
    ResponseInfo createJob(Scheduler scheduler, Map<String, String> paramMap, CurrentUser currentUser);


    /**
     * @Author LiDong
     * @Description // 暂停一个任务
     * @Date 20:38 2021/1/5
     * @Param [scheduler, paramMap, currentUser]
     * @return com.li.configserve.domain.gloabreturn.ResponseInfo
     **/
    ResponseInfo pauseJob(Scheduler scheduler, Map<String, String> paramMap, CurrentUser currentUser);

    /**
     * @Author LiDong
     * @Description // 运行一次
     * @Date 20:55 2021/1/5
     * @Param [scheduler, paramMap, currentUser]
     * @return com.li.configserve.domain.gloabreturn.ResponseInfo
     **/
    ResponseInfo runOnce(Scheduler scheduler, Map<String, String> paramMap, CurrentUser currentUser);

    /**
     * @Author LiDong
     * @Description // 恢复某个任务
     * @Date 20:58 2021/1/5
     * @Param [scheduler, paramMap, currentUser]
     * @return java.lang.String
     **/
    ResponseInfo resumeScheduleJob(Scheduler scheduler, Map<String, String> paramMap, CurrentUser currentUser);
}
